package com.alienlab.finder.service;

import com.alienlab.finder.domain.Warning;

import com.alienlab.finder.service.dto.WarningDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

/**
 * Service Interface for managing Warning.
 */
public interface WarningService {

    /**
     * Save a warning.
     *
     * @param warning the entity to save
     * @return the persisted entity
     */
    Warning save(Warning warning);

    /**
     * Get all the warnings.
     *
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<Warning> findAll(Pageable pageable);


    /**
     * Get the "id" warning.
     *
     * @param id the id of the entity
     * @return the entity
     */
    Optional<Warning> findOne(Long id);

    /**
     * Delete the "id" warning.
     *
     * @param id the id of the entity
     */
    void delete(Long id);

    Warning addWarning(String admin_open_id,String guest_open_id,String desc) throws Exception;

    Warning updateWarning(Long warning_id,String desc) throws Exception;

    WarningDTO getWarningMessageByTaskId(String taskId) throws Exception;

    List<WarningDTO> getWarningList(String admin_open_id) throws Exception;

    Warning modifyReadState(Long warning_id) throws Exception;
}
